package yh.thread.system.shardingtest.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import yh.thread.system.shardingtest.model.RechargeRecordDO;
import yh.thread.system.shardingtest.service.IRechargeRecordService;

import javax.annotation.Resource;
import java.util.HashMap;

/**
 * 社区接口压测汇总整理
 * @author: zyh
 * @date: 2024/12/13 12:29
 **/
@RestController
@RequestMapping("/api/v3.0/recharge-test")
public class RechargeRecordController {




    @Resource
    private IRechargeRecordService rechargeRecordService;


    /**
     * 查询充值记录总记录数
     * @return
     */
    @GetMapping("count")
    public HashMap<String,Object> getCount(){
       return rechargeRecordService.countRechargeRecord();
    }

    /**
     * 保存充值记录
     * @return
     */
    @GetMapping("save-recharge")
    public HashMap<String,Object> saveRechargeRecord(@RequestBody  RechargeRecordDO rechargeRecordDO){
       return rechargeRecordService.saveRechargeRecord(rechargeRecordDO);
    }



}
